[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Aug 2023 18:25:15 +0000 (21:25 +0300)
committerAndrej Shadura <andrewsh@debian.org>
Sun, 25 Jan 2026 13:37:52 +0000 (14:37 +0100)
commit7665c29583cb45bb6874427345afe4c9bddac417
treea26feedd3b3403682fbe0cbd7cafe37f628dc61c
parent7c596d111c00b26892d84273b4c6baec170e9b17
[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224) (#107231)

Previously *consumed was not set in this case.
(cherry picked from commit f08e52ccb027f6f703302b8c1a82db9fd3934270).
(cherry picked from commit b8b3e6afc0a48c3cbb7c36d2f73e332edcd6058c)

Origin: upstream, https://github.com/python/cpython/commit/4a793281956db0e4a1ca5fdc5f3a0e91f331a75d

Gbp-Pq: Name CVE-2025-4516-5.patch
Lib/test/test_unicode.py
Misc/NEWS.d/next/C API/2022-11-20-09-52-50.gh-issue-99612.eBHksg.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Objects/unicodeobject.c